﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using WP7Client.Controller;
using WP7Client.Helpers;
using WP7Client.Classes;

namespace WP7Client.UserInterface.Pages
{
    public partial class ProfilePage : MSHPhoneApplicationPage
    {
        public ProfilePage()
        {
            InitializeComponent();
            ControllerHelper.ProfileController = new ProfileController(this.PivotItem);
        }

        private void MSHPhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            if(this.NavigationContext.QueryString.ContainsKey("username"))
                ControllerHelper.ProfileController.LoadUser(NavigationContext.QueryString["username"]);
        }
    }
}